package org.xtown.bingluo.xtieba.db;

public class DBInfo
{

	
	public static class DB
	{
		
		//数据库名称
		public static  final String DB_NAME = "xtieba"; 
		
		// 数据库版本
		public static final int  VERSION = 1;
		
	}
	
	
	public static class Table
	{
		
		public static final String POSTS_TB_NAME = "posts";
		public static final String POSTS_CREATE = "CREATE TABLE IF NOT EXISTS  " + POSTS_TB_NAME + " ( "+XtiebaPostsDb.ID+" INTEGER PRIMARY KEY AUTOINCREMENT ,"+XtiebaPostsDb.KZID+" TEXT,"+XtiebaPostsDb.TITLE+" TEXT,"+XtiebaPostsDb.AUTHOR+" TEXT, "+XtiebaPostsDb.POSTS_CREATED_AT+" INTEGER, "+XtiebaPostsDb.CREATED_AT+" INTEGER, "+XtiebaPostsDb.UPDATED_AT+" INTEGER)";
		public static final String POSTS_DROP = "DROP TABLE " + POSTS_TB_NAME; 
		
		public static final String POSTS_INFO_TB_NAME="posts_info";
		public static final String POSTS_INFO_CREATE = "CREATE TABLE IF NOT EXISTS  " + POSTS_INFO_TB_NAME + " ( "+XtiebaPostsInfoDb.ID+" INTEGER PRIMARY KEY AUTOINCREMENT ,"+XtiebaPostsInfoDb.POSTS_ID+" INTEGER,"+XtiebaPostsInfoDb.FLOOR_NO+" INTEGER, "+XtiebaPostsInfoDb.CONTENT+" TEXT,"+XtiebaPostsInfoDb.AUTHOR+" TEXT, "+XtiebaPostsInfoDb.POSTS_CREATED_AT+" INTEGER, "+XtiebaPostsInfoDb.CREATED_AT+" INTEGER, "+XtiebaPostsInfoDb.UPDATED_AT+" INTEGER)";
		public static final String POSTS_INFO_DROP = "DROP TABLE " + POSTS_INFO_TB_NAME; 
		
		public static final String AUTHOR_TB_NAME = "author";
		public static final String AUTHOR_CREATE = "CREATE TABLE IF NOT EXISTS  " + AUTHOR_TB_NAME + " ( "+XtiebaAuthorDb.ID+" INTEGER PRIMARY KEY AUTOINCREMENT , "+XtiebaAuthorDb.URL+" TEXT, "+XtiebaAuthorDb.NAME+" TEXT, "+XtiebaAuthorDb.LOCAL_AVATAR+" TEXT, "+XtiebaAuthorDb.INTERNET_AVATAR+" TEXT, "+XtiebaAuthorDb.CREATED_AT+" INTEGER, "+XtiebaAuthorDb.UPDATED_AT+" INTEGER)";
		public static final String AUTHOR_DROP = "DROP TABLE " + AUTHOR_TB_NAME; 
		
		
	}
	
	
	
}
